from gui import gui

class application_window_fake :
    pass

class frame_fake :
    def __init__ ( self , master ) :
        self . _received_grid_args = [ ]
    def grid ( self , _fake_arg = None , column = None , row = None , sticky = None ) :
        self . _received_grid_args = [ column , row , sticky ]

class tkinter_fake :
    def __init__ ( self ) :
        self . _application_windows = [ ]
        self . _frame_collection = [ ]
    def Tk ( self ) :
        window = application_window_fake ( )
        self . _application_windows += [ window ]
        return window
    def Frame ( self , master ) :
        frame = frame_fake ( master )
        self . _frame_collection += [ frame ]
        return frame

class mediator_fake :
    def __init__ ( self ) :
        self . _gui_create_application_window_reply = None
        self . _gui_create_frame_reply = None
    def gui_create_application_window_reply ( self , window ) :
        self . _gui_create_application_window_reply = window
    def gui_create_frame_reply ( self , frame ) :
        self . _gui_create_frame_reply = frame 

class gui_grid_tests :
    'gui_grid'
    def __init__ ( self , test ) :
        self . _test = test
        self . _tkinter = tkinter_fake ( )
        self . _mediator = mediator_fake ( )
        self . _gui = gui ( mediator = self . _mediator , tkinter = self . _tkinter , tkfont = None , scheduler = None )
    def test_gui_grid ( self ) :
        self . _gui . gui_create_application_window_request ( )
        window = self . _mediator . _gui_create_application_window_reply
        self . _gui . gui_create_frame_request ( window )
        frame = self . _mediator . _gui_create_frame_reply
        self . _gui . gui_grid ( frame , 'my column' , 'my row' , 'my sticky' )
        self . _test . assume_equal ( self . _tkinter . _frame_collection [ 0 ] . _received_grid_args , [
            'my column' , 'my row' , 'my sticky'
            ] )
